﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Index</title>
</head>
<body>
    <div> 
        <form method="post">
            <p>姓名1：<input type="text" name="Name" /></p>
            <p>姓名2：<input type="text" name="Name" /></p>
            <p>姓名3：<input type="text" name="Name" /></p>
            <p>姓名4：<input type="text" name="Name" /></p>
            <button type="submit">提交</button>
        </form>
        @if (ViewBag.Name!=null)
        {
            <ul>
                @foreach (var item in ViewBag.Name)
                {
                    <li>@item</li>
                }
            </ul>
        }
    </div>
</body>
</html>
